;Deepak Versions
(defun new-union% (list1 list2)
  (let (acc)
    (defun add-list (list)
      (dolist (elt list)
	(pushnew elt acc)))
    (add-list list1)
    (add-list list2)
    (reverse acc)))

(defun occurences% (list)
  (let (acc)
    (dolist (elt list)
      (let ((pair (assoc elt acc)))
	(if pair
	    (setf (cdr pair)
		  (+ (cdr pair) 1))
	    (push (cons elt 1) acc))))
    (sort acc #'> :key #'cdr)))
